<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>列表</title>
    <header th:replace="header::html"></header>
</head>

<body class="">
    <div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">日志</a>
            <a>
              <cite>日志列表</cite></a>
          </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
            <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>

    <div class="layui-fluid">
        <div class="layui-row  layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">


                    <div class="layui-card-body ">
                        <table class="layui-hide" id="table" lay-filter="member"></table>
                    </div>

                    <div class="layui-card-body ">
                        <script type="text/html" id="barDemo">
<!--                            <a class="layui-btn layui-btn-xs" lay-event="edit" permission="sys:dict:edit">编辑</a>-->
<!--                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" permission="sys:dict:del">删除</a>-->
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>

<script>

    layui.use('table', function(){
        var table = layui.table,
            form=layui.form;
        table.render({
            elem: '#table'
            ,url: '/log/list' //数据接口
            ,page: true //开启分页
            ,response: {
                countName: 'count', //规定数据总数的字段名称，默认：count
                dataName: 'datas' //规定数据列表的字段名称，默认：data
            }
            , cols: [
                [ //表头
                    // {type: 'checkbox', fixed: 'left'}
                    // , {field: 'id', title: 'ID', width: 30, align: 'center'}
                    , {field: 'timestmp', title: '记录时间', width: 150, templet:function(d){
                        return dateUtils.format(new Number(d.timestmp));
                    }}
                    , {field: 'formattedMessage', title: '日志消息', width: 600},
                    , {field: 'loggerName', title: '日志来源', width: 320}
                    , {field: 'levelString', title: '日志等级', width: 150}
                    // , {field: 'dictType', title: 'dictType'}
                    // , {field: 'remark', title: '描述'}
                    // ,{field: 'status', title: '状态', width:120}
                    // , {field: 'updateTime', title: '最后操作时间'}
                    // , {fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150}
                ]
            ]
        });




        checkPermission()
    });
</script>
</body>
</html>